<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="../../generales/plantillas/plantillaMain.xhtml">
	<ui:define name="content">

		<h:form>

			<p:growl id="messages" showDetail="true" />

			<p:schedule value="#{reservasZonasBean.scheduleModel}"
				widgetVar="myschedule" editable="true">

				<p:ajax event="dateSelect"
					listener="#{reservasZonasBean.onEventSelect}"
					oncomplete="eventDialog.show()" />

			</p:schedule>
		</h:form>


		<p:dialog widgetVar="eventDialog" header="Reserva" modal="true"
			showEffect="clip" hideEffect="clip" resizable="false">
			<h:panelGrid id="eventDetails" columns="2">
				<h:form>
					<h:panelGrid columns="2" cellpadding="3">
						<h:outputLabel for="tipoZona" value="#{msg['form.tipoZona']}: *" />
						<p:selectOneMenu id="tipoZona"
							value="#{zonaBean.zona.tipoZona.id}">
							<f:selectItems value="#{zonaBean.tiposZona}" var="tipoZona"
								itemValue="#{tipoZona.id}" itemLabel="#{tipoZona.nombre}" />
						</p:selectOneMenu>
						<h:outputLabel for="tipoZona" value="#{msg['form.tipoZona']}: *" />
						<p:selectOneMenu id="tipoZona1"
							value="#{zonaBean.zona.tipoZona.id}">
							<f:selectItems value="#{zonaBean.zonas}" var="tipoZona"
								itemValue="#{tipoZona.id}" itemLabel="#{tipoZona.nombre}" />
						</p:selectOneMenu>
						
						<h:outputLabel value="#{msg['form.visitas.fecha']} *" />				
						<p:calendar value="#{calendarBean.date2}" id="feDesde" pattern="yyyy/MM/dd HH:mm:ss" size="18" />
						
						<h:outputLabel value="Horas *" />				
						<p:inputText value="" id="horas" size="2" />
						
						<h:outputLabel value="Comentarios "  />	
						<p:inputTextarea value="" id="Comentarios" autoResize="false" cols="22" rows="4"/>
						
						<p:commandButton onclick="" value="Guardar" id="guardar" ></p:commandButton>
						<p:commandButton onclick="" value="Eliminar" id="eliminar" ></p:commandButton>
						
					</h:panelGrid>
				</h:form>
			</h:panelGrid>
		</p:dialog>

	</ui:define>
</ui:composition>
